Skip to content

RMarkdown knit support#122

Merged
Ikuyadeu merged 4 commits intoREditorSupport:masterfrom
dominicwhite:rmd-knit-feature
Sep 17, 2019
Merged

RMarkdown knit support#122
Ikuyadeu merged 4 commits intoREditorSupport:masterfrom
dominicwhite:rmd-knit-feature

Conversation

@dominicwhite
Copy link
Copy Markdown
Contributor

What problem did you solve?

Fixes #121

I'd independently had a the same issue as @a-torgovitsky in Issue #121 - needing a shortcut to knit RMarkdown files.

@mattva01 and I added commands to knit based on @a-torgovitsky's code snippet in his issue. Specifically:

  • One command that Knits to the default document type (i.e. the first type specified in the Rmd header section). Shortcut Ctrl + Shft + K is the same as RStudio.
  • One command that Knits specifically to PDF.

Screenshot

An open Rmd file now looks like:

Screenshot_20190911_211904

However, we are currently reusing the "Run Source" icon for both Knit options (default and PDF):

Screenshot_20190911_211950

I tried creating a custom icon, but the text was far to small to be functionally useful, so I'm not sure what the best solution to this is (perhaps just a single Run Source icon, which runs the default Knit command? Or is reusing the Run Source icon too confusing).

Additional commands (that I would like, at least)

  • Add a Knit to HTML command (which would be useful for my students).
  • Add a Knit to All command.

@dominicwhite dominicwhite changed the title [WIP] RMarkdown support (run and knit) [WIP] RMarkdown knit support Sep 12, 2019
@andycraig
Copy link
Copy Markdown
Collaborator

@dominicwhite @mattva01 Thank you very much for this!

@Ikuyadeu I’m busy this weekend but I could review this PR next week if you’d like.

@Ikuyadeu
Copy link
Copy Markdown
Member

@dominicwhite Thank you for your PR! This PR is WIP isn't is? I will check this after you remove the WIP.
I think, cause of WIP is about the icon of knit command.
One of my idea is using another icon, like LatexExtension that made pdf icons for dark and light mode (and it is MIT license).
If you do not like this icon, I recommend choosing from Official Visual Studio Icon

@andycraig Thank you for telling me. I will check this PR in this week end if @dominicwhite finished.

@dominicwhite
Copy link
Copy Markdown
Contributor Author

@andycraig @Ikuyadeu Thanks for the suggestions.

I just added two extra commands, to Knit to HTML and All formats.

I will look into the icons you suggested later today, and try to get the pull request ready to by merged.

@dominicwhite dominicwhite changed the title [WIP] RMarkdown knit support RMarkdown knit support Sep 13, 2019
@dominicwhite
Copy link
Copy Markdown
Contributor Author

@andycraig @Ikuyadeu I have removed the WIP tag, so please review and let me know if you would like any changes.

Regarding icons: In the end I left a single Run Source icon in place, which reruns the basic Knit command (to the default output type). The other three Knit options are available as commands, but I could not find 4 appropriate icons in the Visual Studio collections.

@Ikuyadeu
Copy link
Copy Markdown
Member

@dominicwhite Thank you for a good fix.
I will check this PR on Monday.

@Ikuyadeu
Copy link
Copy Markdown
Member

Ikuyadeu commented Sep 17, 2019

@dominicwhite Sorry, my reply is late. I checked this now.
And I will publish soon.

@Ikuyadeu Ikuyadeu merged commit eb5b0f9 into REditorSupport:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a command to knit the current Rmd file

3 participants